package com.songtech.uitest.util;

import org.springframework.stereotype.Component;

import java.util.HashMap;

@Component
public class ModulesMapper {

    private HashMap<String, String> map = null;

    /**
     *
     * @param code 方法代码，类似"011",
     * @return 返回类似："AddTower.addOneTower"
     */
    public String getClassMethod(String code){
        if(map == null){
            //三位数前两位代表类名，后一位代表方法名
            map = new HashMap<String, String>();
            map.put("011", "AddTower.addOneTower");
            map.put("013", "AddTower.add3OneTower");
            map.put("021", "PickupMobileID.pickupMobileID");
            map.put("031", "ProposeSubmit.proposeOneSubmit");
            map.put("033", "ProposeSubmit.propose3OneSubmit");
            map.put("041", "ProposeAudit.proposeOneAudit");
            map.put("043", "ProposeAudit.propose3OneAudit");
            map.put("051", "GetTowerId.getTowerId");
            map.put("261", "GenerateTowerId.generateTowerId");
            map.put("061", "UndertakeTower.undertakeTower");
            map.put("063", "UndertakeTower.undertake3Tower");


            map.put("071", "ScreenTower.screenTower");
            map.put("073", "ScreenTower.screen3Tower");
            map.put("081", "ScreenSubmit.screenOneSubmit");
            map.put("083", "ScreenSubmit.screen3OneSubmit");
            map.put("091", "ScreenAudit.screenOneAudit");
            map.put("093", "ScreenAudit.screen3OneAudit");


            map.put("101", "OrderTower.orderTower");
            map.put("103", "OrderTower.order3Tower");
            map.put("111", "OrderSubmit.orderOneSubmit");
            map.put("113", "OrderSubmit.order3OneSubmit");
            map.put("121", "OrderAudit.orderOneAudit");
            map.put("123", "OrderAudit.order3OneAudit");

            map.put("253", "BuildProcessTower.buildProcess3Tower");

            map.put("131", "DeliverTower.deliverTower");
            map.put("133", "DeliverTower.deliver3Tower");
            map.put("141", "DeliverSubmit.deliverOneSubmit");
            map.put("143", "DeliverSubmit.deliver3OneSubmit");
            map.put("151", "DeliverAudit.deliverOneAudit");
            map.put("153", "DeliverAudit.deliver3OneAudit");


            map.put("161", "RentTower.rentTower");
            map.put("163", "RentTower.rent3Tower");
            map.put("171", "RentSubmit.rentOneSubmit");
            map.put("173", "RentSubmit.rent3OneSubmit");
            map.put("181", "RentAudit.rentOneAudit");
            map.put("183", "RentAudit.rent3OneAudit");

            map.put("191", "ArchiveTower.archiveTower");
            map.put("193", "ArchiveTower.archive3OneTower");

            map.put("201", "MobileCancelSubmit.mobileCancelOneSubmit");
            map.put("203", "MobileCancelSubmit.mobileCancel3OneSubmit");
            map.put("211", "CancelAudit.cancelOneAudit");
            map.put("213", "CancelAudit.cancel3OneAudit");
            map.put("221", "TowerCancelConfirm.towerCancelConfirm");
            map.put("223", "TowerCancelConfirm.towerCancel3Confirm");

            map.put("231", "TowerCancelSubmit.towerCancelSubmit");
            map.put("233", "TowerCancelSubmit.towerCancel3Submit");
            map.put("241", "MobileCancelConfirm.mobileCancelOneConfirm");
            map.put("243", "MobileCancelConfirm.mobileCancel3OneConfirm");

        }
        return map.get(code);
    }
}
